<template>
	<view>

		<view class="background-color_FFFFFF margin-bottom_20rpx">
			<view class="display-a" style="padding: 30rpx 0 20rpx;">
				<view class="tabs" @click="getLabel(1)">
					<view class="margin-bottom_20rpx" :style="selLabel == 1 ? 'color:#1E6CEB;' : ''">D音</view>
					<view class="tabs-line tabs-line-3" :style="selLabel == 1 ? 'background: #1E6CEB;' : ''"></view>
				</view>

				<!-- <view class="tabs" :style="setObj.toBeReleased == 1 ? '' : 'width: 250rpx;'" @click="getLabel(1)">
					<view class="margin-bottom_20rpx" :style="selLabel == 1 ? 'color:#1E6CEB;' : ''">机构矩阵</view>
					<view class="tabs-line" :class="setObj.toBeReleased == 1 ? 'tabs-line-3' : 'tabs-line-2'" :style="selLabel == 1 ? 'background: #1E6CEB;' : ''"></view>
				</view> -->
				<view class="tabs" :style="setObj.toBeReleased == 1 ? '' : 'width: 250rpx;'" @click="getLabel(2)">
					<view class="margin-bottom_20rpx" :style="selLabel == 2 ? 'color:#1E6CEB;' : ''">K手</view>
					<view class="tabs-line" :class="setObj.toBeReleased == 1 ? '' : 'tabs-line-2'"
						:style="selLabel == 2 ? 'background: #1E6CEB;' : ''"></view>
				</view>
				<view class="tabs" :style="setObj.toBeReleased == 1 ? '' : 'width: 250rpx;'" @click="getLabel(3)">
					<view class="margin-bottom_20rpx" :style="selLabel == 3 ? 'color:#1E6CEB;' : ''">小红薯</view>
					<view class="tabs-line" :class="setObj.toBeReleased == 1 ? '' : 'tabs-line-2'"
						:style="selLabel == 3 ? 'background: #1E6CEB;' : ''"></view>
				</view>
				<view class="tabs" :style="setObj.toBeReleased == 1 ? '' : 'width: 250rpx;'" @click="getLabel(4)">
					<view class="margin-bottom_20rpx" :style="selLabel == 4 ? 'color:#1E6CEB;' : ''">视频H</view>
					<view class="tabs-line" :class="setObj.toBeReleased == 1 ? '' : 'tabs-line-2'"
						:style="selLabel == 4 ? 'background: #1E6CEB;' : ''"></view>
				</view>

			</view>
		</view>

		<mescroll-body ref="mescrollRef" :height="windowHeight+'rpx'" @init="mescrollInit" @down="downCallback"
			@up="upCallback" :up="upOption" :down="downOption">
			<block v-for="(item,index) in list" :key="index">
				<view class="list-public" style="padding: 0;">
					<view class="list-top">{{item.name}}</view>
					<view :class="selLabel == 5 ? 'display-a' : 'display-a p-bo'" style="padding: 8rpx 0 24rpx;">
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.userCount}}</view>
							<view class="color_8E8E8E">用户数量</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.total_play}}</view>
							<view class="color_8E8E8E">曝光量</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.total_like}}</view>
							<view class="color_8E8E8E">点赞数</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.total_comment}}</view>
							<view class="color_8E8E8E">评论数</view>
						</view>

					</view>
					<view v-if="selLabel == 5" class="display-a" style="padding: 8rpx 0 24rpx;">
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.danmaku}}</view>
							<view class="color_8E8E8E">弹幕数</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.coin}}</view>
							<view class="color_8E8E8E">投币数</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.share}}</view>
							<view class="color_8E8E8E">分享数</view>
						</view>
					</view>
					<view v-if="selLabel == 5" class="display-a p-bo" style="padding: 8rpx 0 24rpx;">
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.favorite}}</view>
							<view class="color_8E8E8E">收藏数</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.follower}}</view>
							<view class="color_8E8E8E">粉丝数</view>
						</view>
						<view class="list-label">
							<view class="color_1E6CEB font-size_32rpx margin-bottom_10rpx">{{item.following}}</view>
							<view class="color_8E8E8E">关注数</view>
						</view>
					</view>
					<view class="display-a padding_30rpx">
						<view class="edit color_1E6CEB" @click="getEdit(item)">编辑</view>
						<view class="line"></view>
						<view class="edit color_FF0000" @click="getDel(item.id)">删除</view>
					</view>
				</view>
			</block>
		</mescroll-body>

		<view class="height80">

		</view>

		<image class="matrix-11" @click="getBatch()" :src="matrix11"></image>

		<custom-tab-bar :items="tabItems" :currentIndex="currentTab" @item-click="onTabClick" :color="color"
			:selectedColor="selectedColor"></custom-tab-bar>

		<sunui-popup ref="pop1">
			<template v-slot:content>
				<view class="display-a-js padding_30rpx p-bo">
					<view class="font-weight_bold font-size_32rpx" style="margin-left: 300rpx;">添加分组</view>
					<view class="color_FF0000" @click="closeBatch1()">关闭</view>
				</view>
				<view style="padding: 34rpx;">
					<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">分组类型</view>
					<view class="flex-between margin-bottom_50rpx">

						<view class="display-a margin-right_40rpx" @click="getType1(1)">
							<image class="matrix-12" :src="groupType1 == 1 ? matrix13 : matrix12"></image>
							<view>D音</view>
						</view>
						<!-- <view class="display-a margin-right_40rpx" @click="getType1(1)">
							<image class="matrix-12" :src="groupType1 == 1 ? matrix13 : matrix12"></image>
							<view>机构矩阵</view>
						</view> -->
						<view class="display-a margin-right_40rpx" @click="getType1(2)">
							<image class="matrix-12" :src="groupType1 == 2 ? matrix13 : matrix12"></image>
							<view>K手</view>
						</view>
						<view class="display-a margin-right_40rpx" @click="getType1(3)">
							<image class="matrix-12 " :src="groupType1 == 3 ? matrix13 : matrix12"></image>
							<view>小红薯 </view>
						</view>
						<view class="display-a " @click="getType1(4)">
							<image class="matrix-12" :src="groupType1 == 4 ? matrix13 : matrix12"></image>
							<view>视频H</view>
						</view>
					</view>
					<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">分组名称</view>
					<input type="text" class="input-name" placeholder="请输入分组名称" placeholder-class="placeholder"
						v-model="groupName" />
					<view class="list-but" @click="getAdd1()">确认添加</view>
				</view>
			</template>
		</sunui-popup>
		<sunui-popup ref="pop2">
			<template v-slot:content>
				<view class="display-a-jc padding_30rpx margin-bottom_30rpx" style="background-color: #fff;">
					<view class="font-weight_bold font-size_32rpx">添加账号</view>
				</view>
				<view class="display-fw-a  p-bo">
					<view style="width: 250rpx;" class="text-align_center margin-bottom_30rpx" @click="getAdd(1)">

						<image class="matrix-17" :src="group3157"></image>
						<view>D音</view>
					</view>

					<view style="width: 250rpx" class="text-align_center margin-bottom_30rpx" @click="getAdd(2)">
						<image class="matrix-17" :src="group3156"></image>
						<view>K手</view>
					</view>

					<view style="width: 250rpx" class="text-align_center margin-bottom_30rpx" @click="getAdd(3)">
						<image class="matrix-17" :src="group3155"></image>
						<view>小红薯发布</view>
					</view>
					<view style="width: 250rpx" class="text-align_center margin-bottom_30rpx" @click="getAdd(4)">
						<image class="matrix-17" :src="group3154"></image>
						<view>视频号发布</view>
					</view>

				</view>
				<view class="cancel" @click="closeBatch()">取消</view>
			</template>
		</sunui-popup>


		<sunui-popup ref="pop3">
			<template v-slot:content>
				<view class="flex-between padding_30rpx " style="background-color: #fff;">
					<view class="font-weight_bold font-size_32rpx">请选择账号分组</view>

					<view class="flex-start-center" @click="addGroup()">
						<image class="addIcon margin-right_16rpx" :src="group3257Four" mode=""></image>
						添加分组
					</view>
				</view>
				<view class="display-fw-a  p-bo">
					<picker mode="selector" @change="bindPickerChange2 " :data-userId="item.id" :range="groupList"
						:range-key="'groupName'">
						<view class="list-publics">
							<!-- <view class="margin-bottom_20rpx">
							选择素材
							<span class="red-dot">*</span>
						</view> -->

							<view class="display-a input-name" style="width: 689rpx;">
								<input type="text" style="width: 689rpx;" v-model="selGroupName" disabled
									placeholder="请选择账号所在的分组" placeholder-class="placeholder" />
								<image class="matrix-20" :src="matrix20"></image>
							</view>

						</view>
					</picker>


				</view>
				<view class="display-fw-a  p-bo">
					<view class="list-publics">
						<!-- <view class="margin-bottom_20rpx">
							选择素材
							<span class="red-dot">*</span>  
						</view> -->
						<pca-picker limitRegion="village" :active.sync="active"
							@getAddressResultObj='getAddressResultObj' @change="changeCity">
							<view class="display-a input-name" style="width: 689rpx;">
								<input type="text" style="width: 689rpx;" v-model="cityObject.city" disabled
									placeholder="请选择地区" placeholder-class="placeholder" />
								<image class="matrix-20" :src="matrix20"></image>
							</view>
						</pca-picker>



					</view>


				</view>
				<view class="flex">
					<view class="share flex" @click="cancel2()"
						style="color: #656565;border-right: 1rpx solid #ECECEC;">
						取消</view>
					<view class=" share flex" style="color: #0E8FF3;" @click="confirm()">
						确定
					</view>
				</view>
			</template>
		</sunui-popup>
		<sunui-popup ref="pop5">
			<template v-slot:content>
				<view class="flex-between padding_30rpx " style="background-color: #fff;">
					<view class="font-weight_bold font-size_32rpx">请选择账号分组</view>

					<view class="flex-start-center" @click="addGroup()">
						<image class="addIcon margin-right_16rpx" :src="group3257Four" mode=""></image>
						添加分组
					</view>
				</view>
				<view class="display-fw-a  p-bo">
					<picker mode="selector" @change="bindPickerChange2 " :data-userId="item.id" :range="groupList"
						:range-key="'groupName'">
						<view class="list-publics">
							<!-- <view class="margin-bottom_20rpx">
							选择素材
							<span class="red-dot">*</span>
						</view> -->

							<view class="display-a input-name" style="width: 689rpx;">
								<input type="text" style="width: 689rpx;" v-model="selGroupName" disabled
									placeholder="请选择账号所在的分组" placeholder-class="placeholder" />
								<image class="matrix-20" :src="matrix20"></image>
							</view>

						</view>
					</picker>


				</view>

				<view class="flex">
					<view class="share flex" @click="cancel3()"
						style="color: #656565;border-right: 1rpx solid #ECECEC;">
						取消</view>
					<view class=" share flex" style="color: #0E8FF3;" @click="confirm()">
						确定
					</view>
				</view>
			</template>
		</sunui-popup>
		<sunui-popup ref="pop6">
			<template v-slot:content>
				<view class="padding15 abc " :style="{ '--bg-images1': `url(${ materialBg})` }">
					<view class="top flex-between">
						<view class="">

						</view>
						<text class="font-weight_bold font-size_32rpx">扫码发布视频</text>
						<uni-icons @click='closeQRcode()' class="uniIcon" type="closeempty" size="22"
							style="color: #07070791;">
						</uni-icons>
					</view>

					<view class="display-a-jc font-size_26rpx " style="color: #666666;margin-top: 15rpx;">
						打开「K快手APP」点击左上角进行扫一扫</view>


					<view class="display-a-jc   padding_30rpx">
						<image class="QRcode " :src="QRcodeKS" mode=""></image>
					</view>



					<view class="flex">
						<view class="share flex" @click='closeQRcode()'
							style="color: #234984;border-right: 1rpx solid #ECECEC;">取消</view>
						<view class=" share flex" v-if="!isSuccess" @click="saveImage(QRcodeKS)">
							<view class=" ">

								保存相册
							</view>
						</view>

					</view>



				</view>

			</template>
		</sunui-popup>

		<sunui-popup ref="pop4">
			<template v-slot:content>
				<view class="padding15 abc" :style="{ '--bg-images1': `url(${ materialBg})` }">
					<view class="top flex-between">
						<view class="">

						</view>
						<text class="font-weight_bold font-size_32rpx">扫码发布视频</text>
						<uni-icons @click='closeQRcode()' class="uniIcon" type="closeempty" size="22"
							style="color: #07070791;">
						</uni-icons>
					</view>

					<view class="display-a-jc font-size_26rpx margin-bottom_30rpx"
						style="color: #666666;margin-top: 15rpx;">
						打开「抖音APP」点击左上角进行扫一扫</view>
					<uni-countdown ref="countdown" class="display-a-jc" v-if="showCount" :show-day="false"
						:second="testSecond" @timeup="timeupFn" color="#FFFFFF" background-color="#007AFF" />

					<view class="display-a-jc   padding_30rpx">
						<image class="QRcode" :src="QRcode" mode=""></image>

						<!-- <uqrcode v-if="!(recodeBol)" class="qrcode" ref="qrcode" canvas-id="qrcode" :value="QRcode"
							size="200"></uqrcode> -->

						<div class="v-be-overdue flex" v-if="recodeBol">
							<!-- <i class="el-icon-refresh-right"></i> -->
							<uni-icons type="clear" color="#ff0000" size="30"></uni-icons>
							<div class="font-weight_bold">二维码异常</div>
							<div class="font-weight_bold">点击重新加载</div>
							<!-- <view style="color: red; margin-top: 40rpx;">
								发布失败:{{errMsg}}
							</view> -->
						</div>

						<div class="v-be-overdue flex" v-if="isSuccess">
							<!-- <i class="el-icon-success" style="color:#67C23A;"></i> -->
							<uni-icons type="checkbox-filled" color="#67C23A" size="30"></uni-icons>
							<div style="margin-top: 32rpx;" class="font-weight_bold">扫码成功</div>
							<view style="color: red; margin-top: 40rpx;" v-if="errMsg">
								发布失败:{{errMsg}}
							</view>
						</div>
						<div class="v-be-overdue flex" v-if="expiredBol">
							<!-- <i class="el-icon-refresh-right"></i> -->
							<uni-icons type="clear" color="#ff0000" size="30"></uni-icons>
							<div class="font-weight_bold">授权失败</div>
							<div class="font-weight_bold">点击重新扫码授权</div>
							<!-- <view style="color: red; margin-top: 40rpx;">
								发布失败:{{errMsg}}
							</view> -->
						</div>


					</view>

					<view class="margin-bottom_10rpx" v-if="isSuccess">
						<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">验证码</view>
						<input type="text" class="input-name" placeholder="请输入dy验证码" placeholder-class="placeholder"
							v-model="dyCode" />
					</view>

					<view class="flex">
						<view class="share flex" @click='closeQRcode()'
							style="color: #234984;border-right: 1rpx solid #ECECEC;">取消</view>
						<view class=" share flex" v-if="!isSuccess" @click="repeatCode">
							<view class=" ">

								重新获取二维码
							</view>
						</view>
						<view class=" share flex" v-if="isSuccess" @click="loginDyCode()">
							<view class=" ">

								完成授权
							</view>
						</view>
					</view>



				</view>

			</template>
		</sunui-popup>

		<!-- 小红薯 -->
		<sunui-popup ref="pop7">
			<template v-slot:content>
				<view class="flex-between padding_30rpx " style="background-color: #fff;">
					<view class="font-weight_bold font-size_32rpx">请选择账号分组</view>

					<view class="flex-start-center" @click="addGroup()">
						<image class="addIcon margin-right_16rpx" :src="group3257Four" mode=""></image>
						添加分组
					</view>
				</view>

				<view class="display-fw-a  p-bo">
					<picker mode="selector" @change="bindPickerChange2 " :data-userId="item.id" :range="groupList"
						:range-key="'groupName'">
						<view class="list-publics">
							<!-- <view class="margin-bottom_20rpx">
							选择素材
							<span class="red-dot">*</span>
						</view> -->

							<view class="display-a input-name" style="width: 689rpx;">
								<input type="text" style="width: 689rpx;" v-model="selGroupName" disabled
									placeholder="请选择账号所在的分组" placeholder-class="placeholder" />
								<image class="matrix-20" :src="matrix20"></image>
							</view>

						</view>
					</picker>


				</view>
				<view class="flex-start-center" style="padding: 0 30rpx 30rpx">
					<!-- 1 小红书扫码 2. cookoe授权 -->
					<view class="display-a margin-right_40rpx" @click="getxhsType(1)">
						<image class="matrix-12" :src="xhsType == 1 ? matrix13 : matrix12"></image>
						<view>扫码绑定</view>
					</view>
					<view class="display-a margin-right_40rpx" @click="getxhsType(2)">
						<image class="matrix-12 " :src="xhsType == 2 ? matrix13 : matrix12"></image>
						<view>小红薯cookie绑定 </view>
					</view>
				</view>
				<view class="margin-bottom_10rpx" style="padding: 0 30rpx 30rpx" v-if="xhsType == 2 ">
					<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">cookie授权</view>
					<textarea v-model="cookie" auto-height maxlength="-1" placeholder="请输入cooki授权绑定" />
				</view>


				<view class="flex">
					<view class="share flex" @click="cancel4()"
						style="color: #656565;border-right: 1rpx solid #ECECEC;">
						取消</view>
					<view class=" share flex" style="color: #0E8FF3;" @click="confirm()">
						确定
					</view>
				</view>
			</template>
		</sunui-popup>


		<sunui-popup ref="pop8">
			<template v-slot:content>
				<view class="padding15 abc" :style="{ '--bg-images1': `url(${ materialBg})` }">
					<view class="top flex-between">
						<view class="">

						</view>
						<text class="font-weight_bold font-size_32rpx">扫码发布视频</text>
						<uni-icons @click='closeQRcode()' class="uniIcon" type="closeempty" size="22"
							style="color: #07070791;">
						</uni-icons>
					</view>

					<view class="display-a-jc font-size_26rpx margin-bottom_50rpx"
						style="color: #666666;margin-top: 15rpx;">
						打开「小红书APP」点击左上角进行扫一扫</view>

					<view class="display-a-jc   padding_30rpx">
						<image class="QRcode" :src="QRcodeXhs" mode=""></image>

						<!-- <uqrcode v-if="!(recodeBol)" class="qrcode" ref="qrcode" canvas-id="qrcode" :value="QRcode"
							size="200"></uqrcode> -->

						<div class="v-be-overdue flex" v-if="recodeBol">
							<!-- <i class="el-icon-refresh-right"></i> -->
							<uni-icons type="clear" color="#ff0000" size="30"></uni-icons>
							<div class="font-weight_bold">二维码异常</div>
							<div class="font-weight_bold">点击重新加载</div>
							<!-- <view style="color: red; margin-top: 40rpx;">
								发布失败:{{errMsg}}
							</view> -->
						</div>

						<div class="v-be-overdue flex" v-if="isSuccess">
							<!-- <i class="el-icon-success" style="color:#67C23A;"></i> -->
							<uni-icons type="checkbox-filled" color="#67C23A" size="30"></uni-icons>
							<div style="margin-top: 32rpx;" class="font-weight_bold">授权成功</div>
							<view style="color: red; margin-top: 40rpx;" v-if="errMsg">
								发布失败:{{errMsg}}
							</view>
						</div>
						<div class="v-be-overdue flex" v-if="expiredBol">
							<!-- <i class="el-icon-refresh-right"></i> -->
							<uni-icons type="clear" color="#ff0000" size="30"></uni-icons>
							<div class="font-weight_bold">授权失败</div>
							<div class="font-weight_bold">点击重新扫码授权</div>
							<!-- <view style="color: red; margin-top: 40rpx;">
								发布失败:{{errMsg}}
							</view> -->
						</div>


					</view>



					<view class="flex">
						<view class="share flex" @click='closeQRcode()'
							style="color: #234984;border-right: 1rpx solid #ECECEC;">取消</view>
						<view class=" share flex" v-if="!isSuccess" @click="repeatCodeXhs()">
							<view class=" ">

								重新获取二维码
							</view>
						</view>

					</view>



				</view>

			</template>
		</sunui-popup>
		<sunui-popup ref="pop9">
			<template v-slot:content>
				<view class="flex-between padding_30rpx " style="background-color: #fff;">
					<view class="font-weight_bold font-size_32rpx">请选择账号分组</view>

					<view class="flex-start-center" @click="addGroup()">
						<image class="addIcon margin-right_16rpx" :src="group3257Four" mode=""></image>
						添加分组
					</view>
				</view>
				<view class="display-fw-a  p-bo">
					<picker mode="selector" @change="bindPickerChange2 " :data-userId="item.id" :range="groupList"
						:range-key="'groupName'">
						<view class="list-publics">
							<!-- <view class="margin-bottom_20rpx">
							选择素材
							<span class="red-dot">*</span>
						</view> -->

							<view class="display-a input-name" style="width: 689rpx;">
								<input type="text" style="width: 689rpx;" v-model="selGroupName" disabled
									placeholder="请选择账号所在的分组" placeholder-class="placeholder" />
								<image class="matrix-20" :src="matrix20"></image>
							</view>

						</view>
					</picker>


				</view>
				<!-- 	<view class="display-fw-a  p-bo">
					<view class="list-publics">
						
						<pca-picker limitRegion="village" :active.sync="active"
							@getAddressResultObj='getAddressResultObj' @change="changeCity">
							<view class="display-a input-name" style="width: 689rpx;">
								<input type="text" style="width: 689rpx;" v-model="cityObject.city" disabled
									placeholder="请选择地区" placeholder-class="placeholder" />
								<image class="matrix-20" :src="matrix20"></image>
							</view>
						</pca-picker>
		
		
		
					</view>
		
		
				</view> -->
				<view class="display-fw-a  p-bo">

					<view class="list-publics">


						<view class="display-a input-name" style="width: 689rpx;">
							<input type="text" style="width: 689rpx;" v-model="sphAccountName" placeholder="请选择账号名称"
								placeholder-class="placeholder" />
							<!-- <image class="matrix-20" :src="matrix20"></image> -->
						</view>

					</view>



				</view>
				<view class="flex">
					<view class="share flex" @click="cancel5()"
						style="color: #656565;border-right: 1rpx solid #ECECEC;">
						取消</view>
					<view class=" share flex" style="color: #0E8FF3;" @click="confirm()">
						确定
					</view>
				</view>
			</template>
		</sunui-popup>
		<sunui-popup ref="pop10">
			<template v-slot:content>
				<view class="padding15 abc" :style="{ '--bg-images1': `url(${ materialBg})` }">
					<view class="top flex-between">
						<view class="">

						</view>
						<text class="font-weight_bold font-size_32rpx">扫码发布视频</text>
						<uni-icons @click='closeQRcode()' class="uniIcon" type="closeempty" size="22"
							style="color: #07070791;">
						</uni-icons>
					</view>

					<view class="display-a-jc font-size_26rpx margin-bottom_30rpx"
						style="color: #666666;margin-top: 15rpx;">
						打开「微信APP」点击左上角进行扫一扫</view>
					<uni-countdown ref="countdown" class="display-a-jc" v-if="showCountSph" :show-day="false"
						:second="testSecond" @timeup="timeupFn" color="#FFFFFF" background-color="#007AFF" />

					<view class="display-a-jc   padding_30rpx">
						<image class="QRcode" :src="QRcode" mode=""></image>

						<!-- <uqrcode v-if="!(recodeBol)" class="qrcode" ref="qrcode" canvas-id="qrcode" :value="QRcode"
							size="200"></uqrcode> -->

						<div class="v-be-overdue flex" v-if="recodeBol">
							<!-- <i class="el-icon-refresh-right"></i> -->
							<uni-icons type="clear" color="#ff0000" size="30"></uni-icons>
							<div class="font-weight_bold">二维码异常</div>
							<div class="font-weight_bold">点击重新加载</div>
							<!-- <view style="color: red; margin-top: 40rpx;">
								发布失败:{{errMsg}}
							</view> -->
						</div>

						<div class="v-be-overdue flex" v-if="isSuccess">
							<!-- <i class="el-icon-success" style="color:#67C23A;"></i> -->
							<uni-icons type="checkbox-filled" color="#67C23A" size="30"></uni-icons>
							<div style="margin-top: 32rpx;" class="font-weight_bold">扫码成功</div>
							<view style="color: red; margin-top: 40rpx;" v-if="errMsg">
								发布失败:{{errMsg}}
							</view>
						</div>
						<div class="v-be-overdue flex" v-if="expiredBol">
							<!-- <i class="el-icon-refresh-right"></i> -->
							<uni-icons type="clear" color="#ff0000" size="30"></uni-icons>
							<div class="font-weight_bold">授权失败</div>
							<div class="font-weight_bold">点击重新扫码授权</div>
							<!-- <view style="color: red; margin-top: 40rpx;">
								发布失败:{{errMsg}}
							</view> -->
						</div>


					</view>

					<view class="margin-bottom_10rpx" v-if="isSuccess">
						<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">验证码</view>
						<input type="text" class="input-name" placeholder="请输入dy验证码" placeholder-class="placeholder"
							v-model="dyCode" />
					</view>

					<view class="flex">
						<view class="share flex" @click='closeQRcode()'
							style="color: #234984;border-right: 1rpx solid #ECECEC;">取消</view>
						<view class=" share flex" v-if="!isSuccess" @click="repeatCodeSph()">
							<view class=" ">

								重新获取二维码
							</view>
						</view>
						<view class=" share flex" v-if="isSuccess" @click="loginDyCode()">
							<view class=" ">

								完成授权
							</view>
						</view>
					</view>



				</view>

			</template>
		</sunui-popup>

		<sunui-popup ref="pop2s">
			<template v-slot:content>
				<view class="display-a-js padding_30rpx p-bo">
					<view class="font-weight_bold font-size_32rpx" style="margin-left: 300rpx;">添加分组</view>
					<view class="color_FF0000" @click="closeBatch2s()">关闭</view>
				</view>
				<view style="padding: 34rpx;">
					<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">分组类型</view>
					<view class="flex-between margin-bottom_50rpx">

						<view class="display-a margin-right_40rpx" @click="getType(1)">
							<image class="matrix-12" :src="groupType == 1 ? matrix13 : matrix12"></image>
							<view>D音</view>
						</view>
						<!-- <view class="display-a margin-right_40rpx" @click="getType(1)">
									<image class="matrix-12" :src="groupType == 1 ? matrix13 : matrix12"></image>
									<view>机构矩阵</view>
								</view> -->
						<view class="display-a margin-right_40rpx" @click="getType(2)">
							<image class="matrix-12" :src="groupType == 2 ? matrix13 : matrix12"></image>
							<view>K手</view>
						</view>
						<view class="display-a margin-right_40rpx" @click="getType(3)">
							<image class="matrix-12 " :src="groupType == 3 ? matrix13 : matrix12"></image>
							<view>小红薯 </view>
						</view>
						<view class="display-a " @click="getType(4)">
							<image class="matrix-12" :src="groupType == 4 ? matrix13 : matrix12"></image>
							<view>视频H</view>
						</view>
					</view>
					<view class="font-size_32rpx font-weight_bold margin-bottom_30rpx">分组名称</view>
					<input type="text" class="input-name" placeholder="请输入分组名称" placeholder-class="placeholder"
						v-model="groupName" />
					<view class="list-but" @click="addSure()">确认添加</view>
				</view>
			</template>
		</sunui-popup>




	</view>
</template>

<script>
	import regionPicker from "@/components/region-picker/region-picker.vue"
	import pcaPicker from '@/components/pca-picker-cc/pca-picker-cc.vue'
	import CustomTabBar from '@/uni_modules/niceui-tabBar/components/niceui-tabBar/niceui-tabBar.vue';
	import {
		tabbar,
		tabbar1,
		tabbar2
	} from '@/uni_modules/niceui-tabBar/common/tabbar.js'
	export default {
		components: {
			CustomTabBar,
			regionPicker,
			pcaPicker,

		},
		data() {
			return {
				group3154: this.$imgs.group3154,
				group3157: this.$imgs.group3157,
				group3156: this.$imgs.group3156,
				group3155: this.$imgs.group3155,
				currentTab: 3,
				tabItems: tabbar2.tabItems,
				color: tabbar2.color,
				selectedColor: tabbar2.selectedColor,


				matrix11: 'https://yuntt.weijuyunke.com/yunttXcxImage/matrix/11.png',
				matrix12: this.$imgs.group3129,
				matrix13: this.$imgs.group3152,
				// 下拉配置项
				downOption: {
					auto: false
				},
				// 上拉配置项
				upOption: {
					auto: false
				},

				list: [],

				selLabel: 1, //1抖音h5发布 3矩阵首页待用户发布查询 4矩阵首页快手发布 5.B站

				groupType1: 1, //1.抖音h5 2.抖音无痕 3.抖音代员工 4.快手 5.B站
				groupName: '', //分组名称

				windowHeight: '',

				setObj: {}, //商家端查询代理基础设置

				isWhether: true, //判断重复点击

				// ==================

				sphAccountName: '',
				testSecond: 180,
				cityObject: {
					pid: '',
					cid: '',
					cityName: '',
					pidName: '',
					city: ''

				},
				dyCode: '',
				matrix11: 'https://yuntt.weijuyunke.com/yunttXcxImage/matrix/11.png',
				matrix12: this.$imgs.group3129,
				matrix13: this.$imgs.group3152,


				group3257Four: this.$imgs.group3257Four,
				navTop: '',
				materialBg: 'https://tuanma.weijuyunke.com/index/images/material.png',

				matrix1: 'https://yuntt.weijuyunke.com/yunttXcxImage/matrix/1.png',
				matrix20: this.$imgs.matrix20,




				matrixStatistics: {},
				type: '',
				isWhether: true,
				groupName: '',
				groupType: 1,
				groupList: [],
				selGroupName: '',
				active: true,
				group_id: '',
				QRcode: '',
				dyInfo: '',
				// 扫码失败
				recodeBol: false,
				// 扫码成功
				isSuccess: false,
				// 授权失败
				expiredBol: false,
				// this.showQrcode()
				timer: '',
				encrypt_uid: '',
				QRcodeKS: '',
				xhsType: 1,
				QRcodeXhs: '',
				xhsInfo: "",
				timerXhs: '',
				timerSph: '',
				cookie: '',
				sphAccountName: "",
				sphInfo: '',


				showCount: true,
				showCountSph: true,
				user: uni.getStorageSync('user'),
				memberSetObj: {}

			}
		},

		onLoad() {
			//获取系统信息
			uni.getSystemInfo({
				success: res => {
					this.windowHeight = res.windowHeight * 2 - 138;
				}
			})
			this.memberSetFn()

		},

		onShow() {
			this.$nextTick(() => {
				this.mescroll.resetUpScroll();
			});
		},


		onHide() {
			console.log('页面隐藏')
			clearInterval(this.timer);
			clearInterval(this.timerXhs);
			clearInterval(this.timerSph);



		},
		// 监听页面卸载
		onUnload() {
			console.log('页面隐藏')
			clearInterval(this.timer);
			clearInterval(this.timerXhs);
			clearInterval(this.timerSph);



		},

		methods: {
			getxhsType(index) {


				this.xhsType = index

			},

			saveImage(url) {
				wx.downloadFile({
					url: url,
					success: (res) => {
						console.log(res)
						// if (res.statusCode === 200) {
						uni.saveImageToPhotosAlbum({
							filePath: res.tempFilePath,
							success: () => {
								uni.showToast({
									title: '保存成功',
									icon: 'success'
								});
							},
							fail: () => {
								uni.showToast({
									title: '保存失败',
									icon: 'none'
								});
							}
						});
					},
					fail: () => {
						uni.showToast({
							title: '下载失败',
							icon: 'none'
						});
					}
				});
			},
			del(id) {
				uni.showModal({
					title: '提示',
					content: '是否确认删除该任务?',
					success: async (res) => {
						if (res.confirm) {
							const result = await this.$http.post({
								url: this.$api.taskDel,
								data: {
									uid: uni.getStorageSync("uid"),
									task_id: id
								}
							});
							if (result.errno == 0) {
								this.$sun.toast(result.messgae);
								setTimeout(() => {
									this.$nextTick(() => {
										this.mescroll.resetUpScroll();
									});
								}, 2000);
							} else {
								this.$sun.toast(result.messgae, 'none');
							}
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			showQrcode() {
				let _this = this;
				this.modal_qr = true;
				// uni.showLoading()
				setTimeout(function() {
					// uni.hideLoading()
					_this.$refs.qrcode.crtQrCode()
				}, 50)
			},
			// 重新扫码
			repeatCode() {
				this.showCount = false

				clearInterval(this.timer);
				this.authorizedQRCodeFn()



				this.isSuccess = false



				setTimeout(() => {
					this.expiredBol = false
					this.recodeBol = false
					this.showCount = true
					this.$refs.countdown.update()
					// this.$refs.countdown.update()
					this.testSecond = 120
				}, 1000)

			},
			// 重新扫码
			repeatCodeXhs() {
				clearInterval(this.timerXhs);
				this.xhsQrcodeFn()


				this.isSuccess = false
				this.recodeBol = false
				this.expiredBol = false



			},

			// 重新扫码
			repeatCodeSph() {
				this.showCountSph = false
				clearInterval(this.timerSph);



				this.authorizedQRCodeFnSph()
				this.isSuccess = false
				setTimeout(() => {
					this.expiredBol = false
					this.recodeBol = false
					this.showCountSph = true
					this.$refs.countdown.update()
					// this.$refs.countdown.update()
					this.testSecond = 120
				}, 1000)





			},
			timeupFn() {
				this.$nextTick(() => {
					if (!this.expiredBol) {
						this.recodeBol = true
					}


				})
				console.log('时间到了')

				// clearInterval(this.timer);

			},
			getAddressResultObj(e) {

				console.log(e)
				this.cityObject.pid = e.province.code
				this.cityObject.cid = e.city.code
				this.cityObject.cityName = e.city.name
				this.cityObject.pidName = e.province.name
				this.cityObject.city = e.province.name + '/' + e.city.name

			},
			addGroup() {
				this.$refs.pop2s.show({
					style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;z-index:9999!important',
					anim: 'bottom',
					position: 'bottom',
					shadeClose: false,
				});
			},

			//分组类型
			getType(type) {
				this.groupType = type;
			},
			//添加分组
			async addSure() {

				if (!this.groupName) {
					this.$sun.toast("请输入分组名称", 'none');
					return;
				}

				if (!this.isWhether) {
					return;
				}
				this.isWhether = false;

				const result = await this.$http.post({
					url: this.$api.groupSave,
					data: {
						name: this.groupName,
						type: this.groupType,
						uid: uni.getStorageSync("uid"),
					}
				});
				if (result.errno == 0) {
					this.$sun.toast(result.message);
					this.groupListFn()
					setTimeout(() => {
						this.selLabel = this.groupType;
						this.groupName = '';
						this.$refs.pop2s.close();
						this.isWhether = true;

					}, 2000);
				} else {
					this.isWhether = true;
					this.$sun.toast(result.message, 'none');
				}
			},
			async groupListFn() {
				const result = await this.$http.get({
					url: this.$api.groupList,
					data: {
						uid: uni.getStorageSync('uid'),
						type: this.type



					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					this.groupList = result.data.map((item) => {
						return {
							groupName: item.name,
							id: item.id
						}
					})

				} else {
					this.$sun.toast(result.message, 'none')
				}
			},

			async matrixIndexFn() {
				const result = await this.$http.get({
					url: this.$api.matrixIndex,
					data: {
						uid: uni.getStorageSync('uid'),


					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					this.matrixStatistics = result.data

				} else {
					this.$sun.toast(result.message, 'none')
				}
			},


			navBack() {
				this.$sun.navBack()
			},
			//账号状态
			bindPickerChange2(e) {

				this.selGroupName = this.groupList[e.detail.value].groupName
				this.group_id = this.groupList[e.detail.value].id
				console.log("---->", e);

			},
			getLabel(index) {
				this.selLabel = index;

				this.$nextTick(() => {
					this.mescroll.resetUpScroll();
				});



			},

			closeBatch2s() {
				this.$refs.pop2s.close()
			},

			closeBatch() {
				this.$refs.pop2.close()
			},
			publish() {
				recodeBol: false;
				// 扫码成功
				isSuccess: false;
				// 授权失败
				expiredBol: false;
				this.$refs.pop2.show({
					style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
					anim: 'bottom',
					position: 'bottom',
					shadeClose: false,
				});
			},

			cancel2() {
				this.$refs.pop3.close()
				this.group_id = ''
				this.cityObject.city = ''
				this.selGroupName = ''
			},
			cancel3() {
				this.$refs.pop5.close()
				this.group_id = ''
				this.selGroupName = ''
			},
			cancel4() {
				this.$refs.pop7.close()
				this.group_id = ''
				this.selGroupName = ''
			},
			cancel5() {
				this.$refs.pop9.close()
				this.group_id = ''
				this.selGroupName = ''
			},
			async memberSetFn() {
				const result = await this.$http.get({
					url: this.$api.memberSet,
					data: {


					}
				});
				if (result.errno == 0) {

					this.memberSetObj = result.data

					console.log(result.data)

				}
			},
			getAdd(type) {
				if (this.user.is_member == 0 && this.memberSetObj.is_open == 1) {
					uni.showModal({
						title: '温馨提示',
						content: '你当前不是会员，请开通会员后享受该功能',
						confirmText: '开通会员',
						confirmColor: '#4A5EFF',
						success: async (res) => {
							if (res.confirm) {


								this.$sun.navGo('/pages/contactUs/memberCenter')

							} else if (res.cancel) {

							}
						}
					});
				} else {
					this.selGroupName = ''
					this.group_id = ''



					this.type = type

					this.groupListFn()
					if (this.type == 1) {
						this.$refs.pop3.show({
							style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
							anim: 'bottom',
							position: 'bottom',
							shadeClose: false,
						});
					} else if (this.type == 2) {
						this.$refs.pop5.show({
							style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
							anim: 'bottom',
							position: 'bottom',
							shadeClose: false,
						});
					} else if (this.type == 3) {
						this.$refs.pop7.show({
							style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
							anim: 'bottom',
							position: 'bottom',
							shadeClose: false,
						});
					} else if (this.type == 4) {
						this.$refs.pop9.show({
							style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
							anim: 'bottom',
							position: 'bottom',
							shadeClose: false,
						});
					}
				}



			},
			async confirm() {
				// 调用函数
				if (this.type == 1) {
					this.showCount = false

					if (!this.group_id) {
						this.$sun.toast('请填写账号分组', 'none')
						return
					}
					if (!this.cityObject.city) {
						this.$sun.toast('请选择ip地区', 'none')
						return
					}


					this.authorizedQRCodeFn()
					this.$refs.countdown.update()

					this.recodeBol = false
					setTimeout(() => {
						this.showCount = true
						this.testSecond = 120
					}, 200)


					this.$refs.pop4.show({
						style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
						anim: 'bottom',
						position: 'bottom',
						shadeClose: false,
					});
				} else if (this.type == 2) {
					if (!this.group_id) {
						this.$sun.toast('请填写账号分组', 'none')
						return
					}
					this.authorizedQRCodeFnKS()
					this.$refs.pop6.show({
						style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
						anim: 'bottom',
						position: 'bottom',
						shadeClose: false,
					});
				} else if (this.type == 3) {
					if (!this.group_id) {
						this.$sun.toast('请填写账号分组', 'none')
						return
					}
					if (!this.cookie && this.xhsType == 2) {
						this.$sun.toast('请填写cookie授权', 'none')
						return
					}
					if (this.xhsType == 2) {
						const result = await this.$http.get({
							url: this.$api.xhsAuth,
							data: {
								uid: uni.getStorageSync('uid'),



								group_id: this.group_id,

								cookies: this.cookie



							}

						});
						if (result.errno == 0) {
							console.log(result.data)

							this.isSuccess = true
							clearInterval(this.timerXhs);

							this.group_id = ''
							this.$sun.toast(result.message, 'none')

							setTimeout(() => {
								this.$refs.pop2.close();
								this.$refs.pop7.close();
								this.$refs.pop8.close();
							}, 500)

						} else {
							this.$sun.toast(result.message, 'none')
						}
					} else {
						this.xhsQrcodeFn()
						this.$refs.pop8.show({
							style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
							anim: 'bottom',
							position: 'bottom',
							shadeClose: false,
						});
					}
				} else if (this.type == 4) {
					this.showCountSph = true
					if (!this.group_id) {
						this.$sun.toast('请填写账号分组', 'none')
						return
					}
					// if (!this.cityObject.city) {
					// 	this.$sun.toast('请选择ip地区', 'none')
					// 	return
					// }

					if (!this.sphAccountName) {
						this.$sun.toast('请选择账号名称', 'none')
						return
					}


					this.authorizedQRCodeFnSph()
					this.$refs.countdown.update()

					this.recodeBol = false
					setTimeout(() => {
						this.showCountSph = false
						this.testSecond = 120
					}, 200)


					this.$refs.pop10.show({
						style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
						anim: 'bottom',
						position: 'bottom',
						shadeClose: false,
					});
				}
			},
			// 获取小红书二维码
			async xhsQrcodeFn() {
				const result = await this.$http.get({
					url: this.$api.xhsQrcode,
					data: {
						uid: uni.getStorageSync('uid'),


					}


				});
				if (result.errno == 0) {
					console.log(result.data)
					this.QRcodeXhs = 'data:image/png;base64,' + result.data.qrcode

					this.xhsInfo = result.data

					this.timerXhs = setInterval(() => {
						this.statusClickXhs();
					}, 7000);


				} else {
					this.$sun.toast(result.message, 'none')
				}
			},
			async authorizedQRCodeFnSph() {
				const result = await this.$http.get({
					url: this.$api.sphQrcode,
					data: {
						uid: uni.getStorageSync('uid'),


					}

				});
				if (result.errno == 0) {
					console.log(result.data)
					this.QRcode = result.data.qrcode

					console.log(this.QRcode)

					this.sphInfo = result.data

					this.timerSph = setInterval(() => {
						this.statusClickSph(this.sphInfo);
					}, 7000);

				} else {
					this.$sun.toast(result.message, 'none')
				}
			},
			// 获取抖音授权二维码

			async authorizedQRCodeFn() {
				const result = await this.$http.get({
					url: this.$api.dyQrcode,
					data: {
						uid: uni.getStorageSync('uid'),



						pid: this.cityObject.pid,

						cid: this.cityObject.cid,



					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					this.QRcode = 'data:image/png;base64,' + result.data.qrcode

					console.log(this.QRcode)

					this.dyInfo = result.data

					this.timer = setInterval(() => {
						this.statusClick(this.dyInfo);
					}, 7000);

				} else {
					this.$sun.toast(result.message, 'none')
				}
			},
			// 获取快手授权二维码

			async authorizedQRCodeFnKS() {
				const result = await this.$http.get({
					url: this.$api.ksQrcode,
					data: {
						uid: uni.getStorageSync('uid'),

						group_id: this.group_id





					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					this.QRcodeKS = result.data





				} else {
					this.$sun.toast(result.message, 'none')
				}
			},

			// 检查状态
			async statusClickSph() {
				const result = await this.$http.get({
					url: this.$api.sphCheck,
					data: {
						uid: uni.getStorageSync('uid'),

						// 			pid: this.cityObject.pid,

						// 			cid: this.cityObject.cid,

						group_id: this.group_id,
						token: this.sphInfo.token,
						nickname: this.sphAccountName


					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					// 发送二维码 1
					// 		if (result.data.status == 1) {


					// 			this.isSuccess = true
					// 			this.encrypt_uid = result.data.encrypt_uid
					// 		}
					// 已授权 2

					if (result.data.status == 1) {

						this.$sun.toast('授权成功', 'none')

						this.sphAccountName = ''
						this.group_id = ''
						// this.cityObject.city = ''
						setTimeout(() => {
							this.$refs.pop2.close();
							this.$refs.pop9.close();
							this.$refs.pop10.close();
						}, 500)
						this.$nextTick(() => {
							this.mescroll.resetUpScroll();
						});

						clearInterval(this.timerSph);
					}

					if (result.data.status == 'expired') {

						this.$sun.toast('授权失败请重新授权', 'none')
						this.recodeBol = false
						this.isSuccess = false
						this.expiredBol = true

						this.sphAccountName = ''
						setTimeout(() => {
							this.$refs.countdown.update()
							this.testSecond = 0
						}, 200)


						clearInterval(this.timerSph);
					}


				} else {
					console.log(result.data)
					this.isSuccess = false
					this.expiredBol = true
					this.recodeBol = false
					clearInterval(this.timerSph);
					this.$sun.toast('授权失败请重新扫码', 'none')
				}
			},

			async statusClickXhs() {
				const result = await this.$http.get({
					url: this.$api.xhsCheck,
					data: {
						uid: uni.getStorageSync('uid'),



						group_id: this.group_id,
						cookies: this.xhsInfo.cookies,
						qr_id: this.xhsInfo.qr_id,
						code: this.xhsInfo.code


					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					// 发送二维码 1
					if (result.data.status == 1) {


						this.isSuccess = true
						clearInterval(this.timerXhs);

						this.group_id = ''
						this.$sun.toast(result.message, 'none')

						setTimeout(() => {
							this.$refs.pop2.close();
							this.$refs.pop7.close();
							this.$refs.pop8.close();
						}, 500)
						this.$nextTick(() => {
							this.mescroll.resetUpScroll();
						});
					}


					if (result.data.status == 'expired') {

						this.$sun.toast('授权失败请重新授权', 'none')
						this.isSuccess = false
						this.recodeBol = false
						this.expiredBol = true





						clearInterval(this.timerXhs);
					}


				} else {
					console.log(result.data)
					this.isSuccess = false
					this.expiredBol = true
					this.recodeBol = false
					clearInterval(this.timerXhs);
					this.$sun.toast('授权失败请重新扫码', 'none')
				}
			},

			// 检查状态
			async statusClick() {
				const result = await this.$http.get({
					url: this.$api.dyCheck,
					data: {
						uid: uni.getStorageSync('uid'),

						pid: this.cityObject.pid,

						cid: this.cityObject.cid,

						group_id: this.group_id,
						token: this.dyInfo.token,
						proxy: this.dyInfo.proxy


					}
				});
				if (result.errno == 0) {
					console.log(result.data)
					// 发送二维码 1
					if (result.data.status == 1) {


						this.isSuccess = true
						this.encrypt_uid = result.data.encrypt_uid
					}
					// 已授权 2

					if (result.data.status == 2) {

						this.$sun.toast('授权成功', 'none')

						this.dyCode = ''
						this.group_id = ''
						this.cityObject.city = ''
						setTimeout(() => {
							this.$refs.pop2.close();
							this.$refs.pop3.close();
							this.$refs.pop4.close();
						}, 500)
						this.$nextTick(() => {
							this.mescroll.resetUpScroll();
						});

						clearInterval(this.timer);
					}

					if (result.data.status == 'expired') {

						this.$sun.toast('授权失败请重新授权', 'none')
						this.isSuccess = false
						this.expiredBol = true
						this.recodeBol = false

						this.dyCode = ''
						setTimeout(() => {
							this.$refs.countdown.update()
							this.testSecond = 0
						}, 200)


						clearInterval(this.timer);
					}


				} else {
					console.log(result.data)
					this.isSuccess = false
					this.recodeBol = false
					this.expiredBol = true
					clearInterval(this.timer);
					this.$sun.toast('授权失败请重新扫码', 'none')
				}
			},
			// 验证登录验证码
			async loginDyCode() {
				if (!this.dyCode) {
					this.$sun.toast('请填写验证码后在授权', 'none')
					return
				}
				const result = await this.$http.get({
					url: this.$api.dyVerifySms,
					data: {


						encrypt_uid: this.encrypt_uid,
						token: this.dyInfo.token,
						code: this.dyCode


					}
				});
				if (result.errno == 0) {
					console.log(result.data)

					if (result.data.verify == 1) {

						this.$sun.toast('验证成功正在授权中请不要关闭页面', 'none')

					}


				} else {
					clearInterval(this.timer);
					console.log(result.data)
					this.$sun.toast(result.message, 'none')
				}
			},

			closeQRcode() {
				if (this.type == 1) {
					this.showCount = false
					this.group_id = ''
					this.selGroupName = ''
					this.cityObject.city = ''
					this.isSuccess = false
					this.expiredBol = false

					this.recodeBol = false
					clearInterval(this.timer);
					this.$refs.pop4.close()
				} else if (this.type == 2) {
					this.group_id = ''
					this.selGroupName = ''

					this.$refs.pop6.close()
					this.$refs.pop2.close()
					this.$refs.pop5.close()


				} else if (this.type == 3) {
					this.group_id = ''
					this.selGroupName = ''
					this.isSuccess = false
					this.expiredBol = false

					this.recodeBol = false
					this.$refs.pop2.close()
					this.$refs.pop7.close()
					this.$refs.pop8.close()
					clearInterval(this.timerXhs);
				} else if (this.type == 4) {
					this.showCountSph = false
					this.group_id = ''
					this.selGroupName = ''
					this.sphAccountName = ''

					this.isSuccess = false
					this.expiredBol = false

					this.recodeBol = false
					this.$refs.pop2.close()
					this.$refs.pop9.close()

					this.$refs.pop10.close()
					clearInterval(this.timerSph);
				}
			},

			// ============================================
			onTabClick(index) { // 切换tab的函数，当选中某个tab时触发
				console.log(index, this.tabItems)
				//this.currentTab = index;
				if (index != this.currentTab) {
					if (index == 0) {
						uni.redirectTo({
							url: this.tabItems[index].pagePath
						})
					} else if (index == 2) {
						this.publish()
					} else {
						uni.redirectTo({
							url: this.tabItems[index].pagePath
						})
					}
				}
			},



			getEdit(obj) {
				uni.navigateTo({
					url: '/pages/matrix/editGroup?obj=' + JSON.stringify(obj) + '&selLabel=' + this.selLabel
				})
			},


			/*  删除  */
			getDel(id) {

				uni.showModal({
					title: '提示',
					content: '确认删除该分组?',
					success: async (res) => {
						if (res.confirm) {
							const result = await this.$http.post({
								url: this.$api.groupDel,
								data: {
									uid: uni.getStorageSync("uid"),
									group_id: id
								}
							});
							if (result.errno == 0) {
								this.$sun.toast(result.message);
								setTimeout(() => {
									this.$nextTick(() => {
										this.mescroll.resetUpScroll();
									});
								}, 2000);
							} else {
								this.$sun.toast(result.message, 'none');
							}
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},

			//添加分组
			async getAdd1() {

				if (!this.groupName) {
					this.$sun.toast("请输入分组名称", 'none');
					return;
				}

				if (!this.isWhether) {
					return;
				}
				this.isWhether = false;

				const result = await this.$http.post({
					url: this.$api.groupSave,
					data: {
						name: this.groupName,
						type: this.groupType1,
						uid: uni.getStorageSync("uid"),
					}
				});
				if (result.errno == 0) {
					this.$sun.toast(result.message);
					setTimeout(() => {
						this.selLabel = this.groupType1;
						this.groupName = '';
						this.$refs.pop1.close();
						this.isWhether = true;
						this.$nextTick(() => {
							this.mescroll.resetUpScroll();
						});
					}, 2000);
				} else {
					this.isWhether = true;
					this.$sun.toast(result.message, 'none');
				}
			},

			//分组类型
			getType1(type) {
				this.groupType1 = type;
			},

			//更多
			getBatch() {
				this.$refs.pop1.show({
					style: 'background-color:#fff;width:750rpx;height:auto;border-radius: 40rpx 40rpx 0 0;',
					anim: 'bottom',
					position: 'bottom',
					shadeClose: false,
				});
			},
			closeBatch1() {
				this.$refs.pop1.close();
			},



			async upCallback(scroll) {
				console.log(this.selLabel)
				const result = await this.$http.post({
					url: this.$api.groupPage,
					data: {
						// 1-D音 2-K手 3-小红薯 4-视频H
						type: this.selLabel ? this.selLabel : 1,
						uid: uni.getStorageSync("uid"),
						page: scroll.num,
						psize: 10
					}
				});
				if (result.errno == 0) {
					this.mescroll.endByPage(result.data.list.length, result.data.total);
					if (scroll.num == 1) this.list = [];
					this.list = this.list.concat(result.data.list);
				}
			},

			getLabel(type) {
				this.selLabel = type;
				this.$nextTick(() => {
					this.mescroll.resetUpScroll();
				});
			},


		}
	}
</script>

<style lang="scss">
	.list-publics {
		padding: 0 30rpx 0rpx;
		margin: 0;

		.input-name {
			width: 610rpx;
			padding: 20rpx;
			border: 2rpx solid #d9d9d9;
			border-radius: 10rpx;
		}

		.red-dot {
			color: #ff0000;
			margin-left: 10rpx;
		}

		.multiLensList {
			// width: 688rpx;
			// height: 116rpx;
			padding: 20rpx 20rpx;
			border-radius: 20rpx;

			background: rgb(248, 248, 248);

			.icon {
				width: 35rpx;
				height: 35rpx;
			}
		}

		.multiLensImg {
			width: 45.84rpx;
			height: 50rpx;
		}
	}

	.list-public {

		box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(0, 0, 0, 0.05);
		margin: 0;
		margin-bottom: 30rpx;
		border-radius: 20rpx;
		margin: 30rpx 20rpx !important;

		.list-top {
			padding: 28rpx 24rpx 0;

			.list-name {
				font-size: 30rpx;
				font-weight: bold;
				width: 662rpx;
				margin-bottom: 34rpx;
			}

			.bgBlue {
				width: 74rpx;
				height: 40rpx;
				border-radius: 8rpx;
				color: #fff;
				background: rgb(22, 109, 253);
			}

			::v-deep .uni-progress-info {
				font-size: 26rpx;
			}

			progress {
				width: 590rpx;
				margin-left: auto;
				color: #05F;
			}
		}

		.list-data-line {
			background-color: #ECECEC;
			height: 30rpx;
			width: 4rpx;
		}

		.list-data {
			width: 234rpx;
			text-align: center;
		}

		.list-label-line {
			background-color: #ECECEC;
			height: 30rpx;
			width: 4rpx;
		}

		.color_FF0_rgb {
			color: rgba(255, 0, 0, 0.34);
		}

		.color_1E6CEB {
			color: #1E6CEB;
		}

		.list-label {
			width: 234rpx;
			text-align: center;
		}
	}

	.v-be-overdue {
		top: 229rpx;
		cursor: pointer;
		position: absolute;
		width: 560rpx;
		height: 445rpx;
		background-color: #fff;
		opacity: 0.96;
		align-items: center;
		display: flex;
		flex-direction: column;
		left: 97rpx;
		z-index: 999;

		i {
			font-size: 48rpx;
			margin-bottom: 24rpx;
		}

		view {
			color: rgba(23, 26, 28, 0.65);
			font-size: 28rpx;
			margin-top: 8rpx;
		}
	}

	.share {
		// height: 300rpx;
		padding: 40rpx;
		width: 50%;
	}

	.list-but {
		width: 600rpx;
		background-color: #0E8FF3;
		padding: 24rpx;
		font-size: 30rpx;
		font-weight: bold;
		text-align: center;
		color: #FFFFFF;
		margin-left: 42rpx;
		margin-top: 90rpx;
	}


	.matrix-12 {
		width: 40rpx;
		height: 40rpx;
		margin-right: 10rpx;
	}

	.matrix-11 {
		width: 96rpx;
		height: 96rpx;
		position: fixed;
		bottom: 170rpx;
		right: 20rpx;
		z-index: 9;
	}

	.addIcon {
		width: 25.9rpx;
		height: 25.9rpx;
	}

	.abc {
		background-image: (var(--bg-images1));
		background-repeat: no-repeat;
		background-size: contain;
		position: relative;
		margin-top: -31rpx;
		border-radius: 40rpx 40rpx 0 0;
		// height: 100vh;
	}

	.QRcode {
		width: 456rpx;
		height: 456rpx;
	}

	.share {
		// height: 300rpx;
		padding: 40rpx;
		width: 50%;
	}

	.matrix-17 {
		width: 96rpx;
		height: 96rpx;
		margin-bottom: 20rpx;
	}

	.matrix-20 {
		width: 18rpx;
		height: 30rpx;
		margin-left: auto;
	}

	// ============================
	.list-but {
		width: 600rpx;
		background-color: #0E8FF3;
		padding: 24rpx;
		font-size: 30rpx;
		font-weight: bold;
		text-align: center;
		color: #FFFFFF;
		margin-left: 42rpx;
	}

	.input-name {
		width: 640rpx;
		border: 2rpx solid #EBEBEB;
		border-radius: 10rpx;
		padding: 30rpx 20rpx;
		margin-bottom: 40rpx;
	}

	.matrix-12 {
		width: 40rpx;
		height: 40rpx;
		margin-right: 10rpx;
	}

	.matrix-11 {
		width: 96rpx;
		height: 96rpx;
		position: fixed;
		bottom: 170rpx;
		right: 20rpx;
		z-index: 9;
	}

	.line {
		width: 2rpx;
		background-color: #EEEEEF;
		height: 36rpx;
	}

	.edit {
		width: 354rpx;
		text-align: center;
		font-size: 30rpx;
	}

	.color_1E6CEB {
		color: #1E6CEB;
	}

	.color_8E8E8E {
		color: #8E8E8E;
	}

	.list-label {
		width: 236rpx;
		text-align: center;
	}

	.list-top {
		padding: 34rpx 24rpx;
		font-size: 32rpx;
	}

	.tabs-line-2 {
		// margin-left: 156rpx;
		margin-left: 74rpx;
	}

	.tabs-line-3 {
		// margin-left: 94rpx;
		margin-left: 43rpx;
	}

	.tabs-line {
		width: 60rpx;
		background-color: #FFFFFF;
		height: 6rpx;
		border-radius: 100rpx;
	}

	.tabs {
		// width: 250rpx;
		width: 186rpx;
		text-align: center;
		color: #A1A1A1;
	}
</style>